//
//  UIViewController_public extension.swift
//  Wanke
//
//  Created by BO ZHOU on 2020/11/20.
//

import UIKit

public extension UIViewController {
    
    
    var beforeController: UIViewController? {
        
        if let nav = self.navigationController {
            
            if nav.children.count > 1 {
                return nav.children[nav.children.count - 2]
            }
        }
        
        return nil
    }
}
